  Items, Weapons and Armor
---------------------------

Items:
 ~Item Data Table~
0x19F07C  0x19F33B
16 bytes per entry.
 +$0-1: Sorting Order
 +$2: Field Effect (HP restore, stat boost, Tent, etc)
 +$3: Targeting:
	0x00 Automatic
	0x01 All Enemies
	0x02 One Enemy
	0x04 User
	0x08 All Allies
	0x10 One Ally
 +$4: Usage:
	0x1 Field
	0x2 Battle
	0x4 Anytime
 +$5: Graphic
 +$6-7: Power
 +$8-B: Purchase Cost
 +$C-F: Sale Price

~Item Inbattle Spell Table~
0x226EA2-0x226EF9
2 bytes per entry
A list of spell IDs, one for each item, that determine what spell the item casts when used in battle.
 +$0-1: Spell ID
This data overrides the item's normal usage and targeting bytes.


Weapons:
0x19F33C  0x19FA57
28 bytes per entry.
 +$00-01: Sorting Order
 +$02: Who equips (base classes)
 +$03: Who equips (advanced classes)
 +$04: Attack
 +$05: Accuracy
 +$06: Evade
 +$07: Spell cast when used
 +$08-09: Elemental infusion
 +$0A: Monster Family effectiveness
 +$0B: Strength Modifier
 +$0C: Stamina Modifier
 +$0D: Agility Modifier
 +$0E: Intellect Modifier
 +$0F: Critical Rate (chance out of 200)
 +$10: HP Boost (%)
 +$11: MP Boost (%)
 +$12-13: [Unused]
 +$14-17: Purchase Cost
 +$18-1B: Sale Price

Armor:
0x19FA58  0x1A021B
28 bytes per entry.
 +$00-01: Sorting Order
 +$02: Who equips (base classes)
 +$03: Who equips (advanced classes)
 +$04: Defence
 +$05: Weight
 +$06: Evade
 +$07: Spell cast when used
 +$08-09: Elemental resistance(s)
 +$0A: Strength Modifier
 +$0B: Stamina Modifier
 +$0C: Agility Modifier
 +$0D: Intellect Modifier
 +$0E: HP Boost (%)
 +$0F: MP Boost (%)
 +$10-13: [Unused]
 +$14-17: Purchase Cost
 +$18-1B: Sale Price

	-What determines which slot a piece of armor goes to?
		-The first character in its name string!

 ~Weapon GFX Data Table~
0x22318C-0x223497
-12 bytes / 3 pointers per entry; indexed by weapon ID
 +$0: Pointer to GFX/tile Data (compressed)
 +$4: Pointer to palette
 +$8: Pointer to animation data to use?

~Shield Blocking Animation Table~
0x223498--?
Indexes from 0x223348, using shield's armor ID
Bytes per entry: 12
 +$0: Pointer to GFX/tile Data (compressed)
 +$4: Pointer to palette
 +$8: Pointer to animation data to use?

 ~Weapon Hit Sound/Animation Table~
0x223603-0x223643
-1 byte per entry; indexed by weapon ID
-Indexes to sound effect, mini-animation that plays on target being struck

~Physical Attack Animation Data Table~
0x1BEC80-0x1BF04F
-16 bytes per entry
 +$0: One-byte identifier:
	0x01: Flip animation horizontally
	0x02: Flip, and Unknown
	0x03: Flip, and Unknown 2
 +$4: Pointer to animation to use (ie how to animate the GFX tiles)
 +$8: Pointer to GFX tile data
 +$C: Pointer to palette data (usually appears right after GFX data)

 Spells
--------

 ~Spell Name/Description Pointer Table~
0x1A1650
8 bytes per entry
 +$0: Pointer to spell's (out of battle?) name
 +$4: Description pointer

 ~Spells/Monster Abilities Data~
0x1A1980-0x1A20BF
Bytes per entry: 16
 +$0: Usage (Battle/Field/Both)
 +$1: Targeting
 +$2-3: Power/Status Type/etc
 +$4-5: Element(s)
 +$6: Spell Type
 +$7: Graphics Index (only for PC casters)
 +$8: Accuracy
 +$9: Spell Level (unused)
 +$A-B: MP Cost
 +$C-F: Price


 ~Spell Usability per class~
0x1A20C0-0x1A2141
Two bytes per spell; consists of a bitfield of classes
First byte is for basic classes, second for advanced:
	0001 Warrior/Knight
	0002 Thief/Ninja
	0004 Monk/Master
	0008 Red Mage/Wizard
	0010 Black Mage/Wizard
	0020 White Mage/Wizard



 ~Spell Name/Graphics Pointer Table?~
0x1AC65C?
0x1ACA30 -- ?
-12 bytes per entry
 +$0: Pointer to spell name text
 +$4: Pointer to ?
 +$8: Unknown, usually 00000000

 ~Spell Animation Data Table~
0x1BE540-0x1BEC7F
-16 bytes per entry
 +$0: One-byte identifier:
	0x00: When monsters cast this spell, flip gfx horizontally and invert x-coords
	0x01: Don't flip spell GFX/X-coords for monster cast
	0x02: Unknown; used for target-all spells
	0x03: Unknown 2
 +$4: Pointer to animation to use (ie how to animate the GFX tiles)
 +$8: Pointer to GFX tile data
 +$C: Pointer to palette data (usually appears right after GFX data)

 Classes
---------

~Class Base Stats~
0x1E1354 (only for base classes)
-16 bytes per entry
 +$0-1: Base HP
 +$2-3: Base MP
 +$4: Starting Spell Level
 +$5: Base Strength
 +$6: Base Agility
 +$7: Base Intellect
 +$8: Base Stamina
 +$9: Base Luck
 +$A: Base Accuracy/Hit Rate
 +$B: Base Evade
 +$C: Base Magic Defense
 +$D: Starting Weapon
 +$E: Starting Chest Armor
 +$F: (Padding)

~Level Table~
	Indicates which stats are guaranteed to go up/have a strong level
Warrior/Knight:		0x223ADC  0x223B3E
Thief/Ninja:		0x223B3F  0x223BA1
Monk/Master:		0x223BA2  0x223C04
Red Mage/Wizard:	0x223C05  0x223C67
White Mage/Wizard:	0x223C68  0x223CCA
Black Mage/Wizard:	0x223CCB  0x223D2D

~Accuracy per level, per class~
0x226FD6-0x226FE1
~Magic Resistance per level, per class~
0x226FE2-0x226FED


 Encounters
------------
~River Encounter Region~
0x1E0A50
~Sea Encounter Region~
0x1E0A70

Encounter Regions consist of eight bytes, each corresponding to an Encounter ID
and organized by their rarity:
+$0: 12/64
+$1: 12/64
+$2: 12/64
+$3: 12/64
+$4: 06/64
+$5: 06/64
+$6: 03/64
+$7: 01/64

~Encounter Rate Pointer Table~
0x216F70 - 0x216F87
4-Byte pointers for each entry; points to data at the Encounter Rates Table
Used for dungeons. Six entries total.
0x216F88 - 0x216FB7
Same as above, but used by overworld/river/ocean

~Overworld Regions Enc. Rate Data Table and BG index~
0x217020 - ?
Index to the alt encounter rate pointer table at $216F88,
and the BG index;
2nd byte is the encounter table to use (normal, swamp, desert, river, sea...)
	Lower rates give more frequent encounters.
	-0x217028: Plains	(value 0x0: Rate 3)
	-0x217030: Wasteland	(value 0x1: Rate 3)
	-0x217038: Forest	(value 0x2: Rate 2)
	-0x21703C: Burnt Forest (value 0x3: Rate 2)
	-0x217040: Deep Forest	(value 0x4: Rate 1)
	-0x217044: Rivers	(value 0x5: Rate 5)
	-0x217048: Waterfall	(value 0x6: Rate 5)
	-0x21704C: Lakes 	(value 0x7: Rate 5)
	-0x217050: Marshes	(value 0x8: Rate 5)
	-0x217054: Swamps	(value 0x9: Rate 4)
	-0x217058: Desert	(value 0xA: Rate 5)
	-0x21705C: Ocean	(value 0xB: Rate 6)

~Random Encounter Group Probability Table~
0x2170A0  0x2170DF
(eg. Battle #8, regardless of the monster formation therein, only has a 1/64 chance of showing)


~Overworld (Normal) Encounter Regions~
0x2170E0
~Overworld (Desert) Encounter Regions~
0x2172F8
~Overworld (Swamps) Encounter Regions~
0x2174F8

~Dungeon Encounter Regions~
0x2177CC

~Encounter Rates Table~
0x21B334 - 0x21B3F3
32 bytes for each entry
-Every halfword (2 bytes) is a chance out of 1024 that an encounter will be triggered on that step.
-Every step, the next value in the entry is read, until the 16th step which just continues reading the 16th value
-So, encounter rates change/increase over the first sixteen steps in an area with random encounters.

~Encounter Monster Placement~
0x223708 - 0x22378B
Coordinates where monsters can be placed, for all battle configurations, in (X,Y) format.
Number of coordinates required depends on the battle configuration.

~Encounter Data (2 copies)~
0x2288B4  0x22A587
0x22D3E4  0x22F0B7
	-Both of these are used, even though they are identical
20 bytes per entry.
 +$00: Battle Configuration
	0x00 1-9 Small monsters (3x3)
	0x01 1-2 Large, 1-6 Small
	0x02 1-4 Large
	0x03 1 Fiend-size monster
	0x04 1 Small miniboss
	0x05 1-9 Small land+flying monsters
	0x06 Dawn of Souls boss
	(Flying monsters include Cockatrices, Gargoyles and their palette swaps)
 +$01: Is encounter runnable? 0x00 if yes, 0x01 if not
 +$02-03: Surprise Chance; base chance for an ambush to occur, vs normal and preemptive
 +$04: Group #1 Monster ID
 +$05: Group #1 Min Count
 +$06: Group #1 Max Count
 +$07: (Padding)
 +$08: Group #2 Monster ID
 +$09: Group #2 Min Count
 +$0A: Group #2 Max Count
 +$0B: (Padding)
 +$0C: Group #3 Monster ID
 +$0D: Group #3 Min Count
 +$0E: Group #3 Max Count
 +$0F: (Padding)
 +$10: Group #4 Monster ID
 +$11: Group #4 Min Count
 +$12: Group #4 Max Count
 +$13: (Padding)



 Monsters
----------
~Monster ??? Pointer Table~
0x1DDD38 - 0x1DE043
4 bytes per entry

~Monster Data(4 copies)~
    01DE044  01DF8A3
    0223F4C  02257AB
    0227054  02288B3
    022A880  022C0DF
Each copy is used by the game for different purposes.
32 bytes per entry.
 +$00-01: EXP given
 +$02-03: Gil given
 +$04-05: Max HP
 +$06: Morale
 +$07: AI Byte (unused)
 +$08: Evasion
 +$09: Defence
 +$0A: Number of hits
 +$0B: Accuracy
 +$0C: Attack
 +$0D: Agility
 +$0E: Intelligence
 +$0F: Critical Rate (chance out of 200 per hit)
 +$10-11: Status Attack Element
 +$12: Status Attack Ailment
 +$13: Monster Family
 +$14: Magic Defence
 +$15: (Unused)
 +$16-17: Elemental Weakness(es)
 +$18-19: Elemental Resistance(s)
 +$1A: Item Drop Type:
	0x00 Nothing
	0x01 Consumable
	0x02 Weapon
	0x03 Armor
 +$1B: Dropped Item ID
 +$1C: Drop Chance (%)
 +$1D-1F: (Unused/Padding)



~Monster GFX Pointer table~
0x2227DC  0x2230FF
12 bytes per entry
 +$0: Palette
 +$4: Tile Arrangement data
 +$8: Monster tile data

~Monster Attack Animation Table~
0x223540  0x223603
Each monster gets one byte describing what animation+SFX their physical attack uses
	-The bytes get 0x2D added to them after reading

~Monster Size Table~
0x223644  0x223706
One byte per monster.
	0x00: Small Monster (eg Goblin)
	0x01: Big Monster (eg Troll)
	0x02: Fiend/Chaos Monster
	0x03: Soul of Chaos Boss

~Monster Death Animations - Pixel Line Erase Order Tables~
Normal Battles:
	Small: 0x22A5E1
	Large: 0x22A601
Indicates which line of the monster's sprite to erase for every frame of the animation.
Minibosses:
	Small: 0x22A631
	Large: 0x22A651

~Enemy AI ID Table~
0x22F0B8  0x22F17A
Determines which AI every monster uses; one byte per monster

~AI Definitions~
0x22F17C  0x22F5CB
16 Bytes per entry.
 +$00: Chance to cast a spell, out of 200
 +$01: Chance to cast a monster spell, out of 128, if a spell wasn't cast
 +$02-09: Spell queue. Each spell in the queue is cast in order. When an FF byte is reached, the queue loops.
 +$0A: FF terminator
 +$0B-0E: Ability queue. Expressed as (Spell ID - 0x41), so Icestorm 1 is the first legal ability.
 +$0F: FF terminator

 Map-Related Data
------------------
Map Init Events Pointer table
0x007050
4 bytes each.
-Whenever a map is loaded, the events pointed to by the map's Init Event pointer will be run.
	-Used to e.g; disable collision for warp circle sprites, remove/add/change NPCs depending
	on event state..

?? byte table
0x1DC76B
Indexed to by (mapID - 1); overworld doesn't access

?? Pointer table
0x1E4F40
4 bytes per.

Map Misc Data Table:
0x2160D0 - 0x21676F
8 bytes per entry
 +$00-03: Exit Data Pointer; controls where the stairs, etc on this map lead/what map they warp to
 +$04: Music ID for this map
 +$06: Encounter Rate (and seemingly only that) Index; indexes to pointer table at $216F70

0x2176F8:
Battle Background IDs for all maps; indexed to by map ID

Soul of Chaos-related table:
Indexes from 0x217E08 using Map ID
12 bytes per entry.

Tileset Data Table:
0x21DC54 - ?
36/0x24 bytes per entry.
 +$00: TSA pointer
 +$04: Tile GFX pointer
 +$08: Main palettes pointer
 +$0C: Interior palettes pointer
 +$10: Tile collision/properties pointer
 +$14: Tile animation data pointer?
 +$18: Tile scrolling data pointer; used only by Onrac, for its moving ocean tiles
 +$1C: Palette cycling data pointer? Leads to 0xC-byte data; two halfwords and two pointers
 +$20: Door-related pointer

Chest Contents Table:
0x217FB4-0x2183B3:
All chest contents, sorted by ID. Each entry contains four bytes. Total of 256 entries.
 +$00: Item type (Items, Weapons, Armors)
 +$01-02: Item ID
 +$03: Item/Money identifier - if bit 0x80 is not set, the chest is a money chest, and $00-02 indicate the amount

Map Main Data Table:
0x21F274-?
32 bytes per entry.
  +$0-3: Pointer to LZ77-compressed map data
  +$0-4: Tileset ID
  +$8-B: Map Type; 0x0 for OW, 0x1 for dungeons/castles/Sage's Cave, 0x2 for towns/shops; controls how doors act, other things?
  +$C-F: Map name text (pause menu)
  +$10-13: Map name text (title bar)
  +$14-17: Map name text (unknown)
  +$18-1B: Pointer to door data
  +$1C-1F: Door count


Soul of Chaos Chest Contents:
0x21C3BC - 0x21CCE3
A list of the contents of every chest per floor - not per map - per dungeon.
Same formatting as normal chests.

World Map terrain type mask:
0x47E7D8 - ??
	-Byte for the terrain type (for encounter finding) of every tile in the world map
	-0x0: Mountains
	-0x1: Plains
	-0x2: Wasteland
	-0x3: Forest
	-0x4: Burnt Forest
	-0x5: Deep Forest
	-0x6: River
	-0x7: Waterfall
	-0x8: Lake
	-0x9: Marsh
	-0xA: Swamp
	-0xB: Desert
	-0xC: Ocean


 Uncategorized
---------------
Music Pointer Table
0x1A7958-0x1A7C3F
-12 bytes per entry
Points to the sound data and track names for each track
-May be unused/debug
 +$0: Music data pointer?
 +$4: some index
 +$8: Music name text pointer

Sound Effect Pointer Table
0x1AC65C-0x1AE257
-12 bytes per entry
Points to the SFX and internal name for each SFX
-May be unused/debug
 +$0: Sound data pointer?
 +$4: some index
 +$8: SFX name text pointer


Bestiary Entry Listings
0x1DCA34-0x1DCD3F
-4 bytes per entry
Lists each monster to appear in the bestiary in bestiary order, and other parameters
 +$0: Monster ID
 +$1: Battle BG ID
 +$2-3: Padding?

Sound Misc. Table
0x8D3010
-24 bytes in each entry?
-Contains pointers to various regions in fast WRAM; accessd by data in Sound Pointer Table
Sound Pointer Table
0x8D3058
-8 Bytes in each entry
 +$0: Pointer to compressed sound data
 +$4: Index to data in sound Misc. Table (hw)
 +$6: ?? (hw)

Experience Table:
0x1BE3B4-0x1BE53F
-4 bytes for each level, representing total amount of EXP needed for that level

Animation ASM routine pointer table:
0x1D94C8
-Indexed to by first byte in anim's anim data struct

Anim Chunk Length Table?
0x1D96A0
Indicates how long each animation chunk is, in bytes

Shop Pointer/Type Table:
01E070C  01E08A3
01DFB04  01DFC8B duplicate


 UNKNOWN
----------
0x216770 - 0x21696F
Counts from 0x00 to 0xFF in halfwords.

0x223EFC-0x223F3C
8 bytes each?
	-Loaded when PC actions happen
	-For controlling visual effects? Contains pointers to I/O address...04000050,04000040 etc
 +$0-3: I/O register pointer
 +$4-5: Halfword to store to above I/O register

Action Animation Parameters Table?:
0x226AB0-0x226E6F?
-Pointer Table at 0xEDF2F0
12 bytes each? (but multiple read in succession during an animation)
Controls stuff like how far forward a character steps before running their weapon swing/casting anim
 +$0-1: Distance to step forward (more negative = further left)
 +$2-3: Vertical displacement (larger = down)
 +$4-5: Which pose to use (for this section of the animation)
 +$6-7: Distance to step back? (more negative = further right) Or identifier?
 +$8: Facing? 0x1 for right, 0x0 for left?


0xEDC530
-Contains a lot of ASM routine pointers